home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / shrlk201.zip / _SETUP.1 / Main.cpp < prev    next >
C/C++ Source or Header  |  1997-07-22  |  2KB  |  54 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Main.h"
  6. //---------------------------------------------------------------------------
  7. #pragma link "sampreg"
  8. #pragma resource "*.dfm"
  9. TForm1 *Form1;
  10. //---------------------------------------------------------------------------
  11. __fastcall TForm1::TForm1(TComponent* Owner)
  12.     : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TForm1::txtUserNameChange(TObject *Sender)
  17. {
  18.   txtCodeOut->Text = "";
  19. }
  20. //---------------------------------------------------------------------------
  21. void __fastcall TForm1::txtPrivateKeyChange(TObject *Sender)
  22. {
  23.   txtCodeOut->Text = "";
  24. }
  25. //---------------------------------------------------------------------------
  26. void __fastcall TForm1::rgUnlockTypeClick(TObject *Sender)
  27. {
  28.   if (rgUnlockType->ItemIndex == 0)
  29.    {
  30.       seExtension->Enabled = False;
  31.       seExtension->Value = 0;
  32.       lblExtensionLength->Enabled = False;
  33.     }
  34.   else
  35.     {
  36.       seExtension->Enabled = True;
  37.       lblExtensionLength->Enabled = True;
  38.     }
  39.  
  40. }
  41. //---------------------------------------------------------------------------
  42. void __fastcall TForm1::seExtensionChange(TObject *Sender)
  43. {
  44.   if (seExtension->Value == 0) rgUnlockType->ItemIndex = 0;
  45.   else rgUnlockType->ItemIndex = 1;
  46.   txtCodeOut->Text = "";
  47. }
  48. //---------------------------------------------------------------------------
  49. void __fastcall TForm1::btnGenerateKeyClick(TObject *Sender)
  50. {
  51.   txtCodeOut->Text = GenerateKey(txtUserName->Text.c_str(), txtPrivateKey->Text.c_str(), seExtension->Value);
  52.  
  53. }
  54. //---------------------------------------------------------------------------